<?php

class HTML_Fluent_XHTML extends HTML_Fluent_XHTML_Base {

    protected $factory;

    public function __construct(HTML_Fluent_Factory $factory = null) {
        if (!$factory instanceof HTML_Fluent_Factory) {
            $factory = new HTML_Fluent_XHTML_Factory();
        }
        $this->factory = $factory;
    }

    public function setFactory(HTML_Fluent_Factory $factory) {
        $this->factory = $factory;
    }

    public function getFactory() {
        return $this->factory;
    }

    public function say($string) {
        print htmlspecialchars($string);
        return $this;
    }

}
